package com.itheima.servlet;


import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


/*
处理类
@WebServlet:对servlet配置

    name: 设置servlet名称  <servlet-name>
    value与urlPatterns:都是用于设置url匹配模式 <url-pattern>
    注意:如果一个注解中只配置value属性时,value可以省略
        如果value的类型是数组,而只设置一个元素时,那么{}可以省略 如 (/demo/8*)

      <load-on-startup>1</load-on-startup>


                      <param-name>name</param-name>
                      <param-value>张三</param-value>
    initParams = {@WebIntParam(name="username",value="张三")
    ,@WebIntParam(name="name",value="李四")}



 */

@WebServlet("/demo/*")
public class DemoServlet extends HttpServlet {

    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("---");
    }
}
